<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/common/tags.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
<title>检测信息</title>
<script type="text/javascript">
	$(function () {
		reload();
	});
	
	function reload() {
		setInterval(function() {
			$.get(ctx + "/check.json"+window.location.search, {}, function(data) {
				$('#main').html(data);
			}, "html");
		}, 6000);
	}
	
	
</script>
<style type="text/css">	
   table.imagetable {
	font-family: verdana,arial,sans-serif;;
	border: 1px solid #BfD6E1;
	border-collapse: collapse;
	width:100%;
   }
   
   table.imagetable th {
	background:#b5cfd2;
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #BfD6E1;
	font-size: medium;
}
    table.imagetable td {
    text-align:center;
	background-color: #FEFEFE; 
	border-width: 1px;
	width:500px;
	heigth:300px;
	padding:5px;
	border: 1px solid #BfD6E1;
	font: 17px 'Microsoft YaHei','微软雅黑';
}
</style>
</head>
<body>
<table class="imagetable">

    <tr>
	  <th>设备ID</th> <th>路段</th> <th>收费站名</th> <th>连接状态</th>
	  <th>专网-0</th> <th>专网-1</th> <th>VPN</th> <th>VPN设备</th>
    </tr>
    
    <c:forEach items="${devNetStates}" var="ds" varStatus="vs" >    
      
    <tr>
	<td>${ds.id}</td>
	<td>${ds.roadName}</td> 
	<td>${ds.name}</td> 
	<td>	
		<c:if test="${ds.state == 0}">
			在线
		</c:if>
		<c:if test="${ds.state == 1}">
		<font color="red">断开</font>
		</c:if>
	</td>
	
	<%--显示在线监控状态信息--%>
	<c:if test="${ds.state == 0}">
	
	<td>
	 <c:if test="${ds.toPnServerState ==0 }">
	        正常
	 </c:if>
	 <c:if test="${ds.toPnServerState ==1 }">
	      恢复连接
	 </c:if>
	 <c:if test="${ds.toPnServerState ==2 }">
	       <font color="red"> 连接异常</font>
	 </c:if> 
	 <c:if test="${ds.toPnServerState ==4 }">
	      不检测
	 </c:if>
	</td>
	
	<td>
	  <c:if test="${ds.toPnLocalState ==0 }">
	        正常
	 </c:if>
	 <c:if test="${ds.toPnLocalState ==1 }">
	      恢复连接
	 </c:if>
	 <c:if test="${ds.toPnLocalState ==2 }">
	       <font color="red"> 连接异常</font>
	 </c:if> 
	 <c:if test="${ds.toPnLocalState ==4 }">
	      不检测
	 </c:if>
	</td>
	
	<td>
	  <c:if test="${ds.toVpnServerState ==0 }">
	        正常
	 </c:if>
	 <c:if test="${ds.toVpnServerState ==1 }">
	      恢复连接
	 </c:if>
	 <c:if test="${ds.toVpnServerState ==2 }">
	       <font color="red"> 连接异常</font>
	 </c:if> 
	 <c:if test="${ds.toVpnServerState ==4 }">
	      不检测
	 </c:if>
	</td>
	
	<td>
	  <c:if test="${ds.toVpnLocalState ==0 }">
	        正常
	 </c:if>
	 <c:if test="${ds.toVpnLocalState ==1 }">
	      恢复连接
	 </c:if>
	 <c:if test="${ds.toVpnLocalState ==2 }">
	       <font color="red"> 连接异常</font>
	 </c:if> 
	 <c:if test="${ds.toVpnLocalState ==4 }">
	      不检测
	 </c:if>
	</td>
	
	</c:if>
	
	<c:if test="${ds.state != 0}">
	 <td></td>
	 <td></td>
	 <td></td>
	 <td></td>
	 
	</c:if>
	
	
    </tr>
    </c:forEach>
    
  
</table>
    <div class="pageArea_div">
         <%@ include file="/WEB-INF/common/paginator.jsp"%>
    </div>		
</body>
</html>
